-
Notifications
You must be signed in to change notification settings - Fork 2.9k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
phase1: fix emoji picker refocus issue #35572
Conversation
@parasharrajat Please copy/paste the Reviewer Checklist from here into a new comment on this PR and complete it. If you have the K2 extension, you can simply click: [this button] |
Hey @parasharrajat I believe this is the first PR related to this issue. |
Thanks. Sure, I will get into this. |
@ntdiary i'm trying to get as much context i can, so this PR (phase1) only handles the case described in the PR right? |
FYI, I am back from OOO so I can pick up this PR. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
small changes.
let focusedInput: InputElement = null; | ||
let uniqueModalId = 1; | ||
const focusMap = new Map<ModalId, FocusMapValue>(); | ||
const activeModals: ModalId[] = []; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
const activeModals: ModalId[] = []; | |
const activeModals = new Set<ModalId>(); |
I feel like a set suits our usecase best than an array & will help us simplify the code, will share full code if you want, will require some changes to the whole code :)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I feel like a set suits our usecase best than an array & will help us simplify the code, will share full code if you want, will require some changes to the whole code :)
We still need to get the index of the modalId
in the queue, and the last element in the queue. not sure, could Set
conveniently fulfill this requirement? 🤔
BTW, I also wanted to use Array.at
, but based on the caniuse data, I'm a bit concerned about its compatibility unless we can add polyfill. 😂
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We still need to get the index of the modalId in the queue, and the last element in the queue. not sure, could Set conveniently fulfill this requirement? 🤔
Interesting, will have a deeper look, i thought it would be the most suitable
BTW, I also wanted to use Array.at, but based on the caniuse data, I'm a bit concerned about its compatibility unless we can add polyfill. 😂
i think, we already use babel-polyfill
, wouldn't that also handle this? we're using it most of the places.
Co-authored-by: Getabalew Tesfaye <75031127+getusha@users.noreply.github.com>
Testing |
@ntdiary i can notice a kind of swift glitch (switching focus from the second input)
video_2024-02-28_09-33-43.mp4 |
Similar case as ^, focus the second input, open emoji picker on the above input and pick an emoji video_2024-02-28_09-40-15.mp4 |
BUG: focus not restored after opening profile details page
video_2024-02-28_09-43-06.mp4 |
Able to reproduce on lower versions :) Screen.Recording.2024-03-27.at.5.53.09.in.the.afternoon.mov |
Will test it on several devices. |
Screen.Recording.2024-03-28.at.1.54.36.in.the.afternoon.mov
Screen.Recording.2024-03-28.at.1.55.56.in.the.afternoon.mov |
@getusha, have fixed the selection bug, can't reproduce the crash bug. If you can reproduce it, it would be great if you can also provide the os version and chrome version ,and then I can try again. :) |
it's probably a conflict, checking again. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Code looks good testing.
Keyboard is not opening after closing the popover from top right button Screen.Recording.2024-04-04.at.2.25.06.in.the.afternoon.mov |
Same for request money Screen.Recording.2024-04-04.at.2.27.23.in.the.afternoon.mov |
@getusha, do you think these two issues are regressions caused by this PR? So far, we only fixed the emoji modal case to make the PR reviews easier. 😂 |
Oh mb, since we linked the issue, i was testing the cases you listed #29011 (comment) |
Hey @ntdiary would you mind merging main to resolve conflicts once more please |
Have just merged. 😄 |
🧪🧪 Use the links below to test this adhoc build on Android, iOS, Desktop, and Web. Happy testing! 🧪🧪 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
testing well to me based on our most recent requirements
✋ This PR was not deployed to staging yet because QA is ongoing. It will be automatically deployed to staging after the next production release. |
🚀 Deployed to staging by https://github.com/Julesssss in version: 1.4.61-0 🚀
|
🚀 Deployed to staging by https://github.com/Julesssss in version: 1.4.61-0 🚀
|
🚀 Deployed to production by https://github.com/Julesssss in version: 1.4.61-8 🚀
|
Details
Fixed Issues
$ #29011
PROPOSAL: #29011 (comment)
Tests
Note: For the iOS Safari platform, it only focuses without opening the keyboard, which is another separate issue and is beyond the scope.
Offline tests
Same as Tests
QA Steps
Same as Tests
PR Author Checklist
### Fixed Issues
section aboveTests
sectionOffline steps
sectionQA steps
sectiontoggleReport
and notonIconClick
)myBool && <MyComponent />
.src/languages/*
files and using the translation methodWaiting for Copy
label for a copy review on the original GH to get the correct copy.STYLE.md
) were followedAvatar
, I verified the components usingAvatar
are working as expected)StyleUtils.getBackgroundAndBorderStyle(theme.componentBG)
)Avatar
is modified, I verified thatAvatar
is working as expected in all cases)Design
label so the design team can review the changes.ScrollView
component to make it scrollable when more elements are added to the page.main
branch was merged into this PR after a review, I tested again and verified the outcome was still expected according to theTest
steps.Screenshots/Videos
Android: Native
35572-android-native.mp4
Android: mWeb Chrome
35572-android-chrome.mp4
iOS: Native
35572-ios-native.mp4
iOS: mWeb Safari
35572-ios-safari.mp4
MacOS: Chrome / Safari
35572-web.mp4
MacOS: Desktop
35572-desktop.mp4